﻿@model MvcAtletIS.Models.DisciplineList

@{
    ViewBag.Title = "Zoznam disciplín";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Zoznam disicplín: @ViewBag.Competition.Name</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Pridať položku</legend>

        <div class="editor-label">
            Disciplína
        </div>
        <div class="editor-field">
            @Html.DropDownList("DisciplineId", String.Empty)
            @Html.ValidationMessageFor(model => model.DisciplineId)
        </div>

        <div class="editor-label">
            Kategória
        </div>
        <div class="editor-field">
            @Html.DropDownList("CategoryId", String.Empty)
            @Html.ValidationMessageFor(model => model.CategoryId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Description)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Description)
            @Html.ValidationMessageFor(model => model.Description)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ExternalId)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ExternalId)
            @Html.ValidationMessageFor(model => model.ExternalId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.OfficialStartTime)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.OfficialStartTime)
            @Html.ValidationMessageFor(model => model.OfficialStartTime)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Day)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Day)
            @Html.ValidationMessageFor(model => model.Day)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Relay)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Relay)
            @Html.ValidationMessageFor(model => model.Relay)
        </div>

        <p>
            <input type="submit" value="Pridať" />
        </p>

        <p>
            @Html.ActionLink("Naspäť na zoznam disciplín", "Index", new { competitionId = @ViewBag.Competition.ID })
        </p>

    </fieldset>
}